<template>
  <div>
    <h2>测试表单提交</h2>
    <a-button @click="editInfo">dk</a-button>
    <edit-user-info @closeEditUserInfo="closeEditUserInfo" :show-visible="showVisible"></edit-user-info>
  </div>
</template>

<script>
import commentTalk from '@/components/index/commentTalk'
import {useStore} from 'vuex'
import {computed} from "vue"; // 引入useStore 方法
import editUserInfo from "@/components/user/editUserInfo";

export default {
  name: "test",
  components: {
    commentTalk,
    editUserInfo
  },
  data() {
    return {
      showVisible: false,
      showStatus: true,
      talkId: 0,
      userId: 0,
      visible: false,
    }
  },

  created() {
  },
  setup() {

    let store = useStore();
    return {
      token: computed(() => {
        return store.getters.getToken
      }),
      userinfo: computed(() => {
        return store.getters.getUser
      })
    }
  },
  methods: {
    editInfo(){
      this.showVisible=true
    },
    closeEditUserInfo() {
      this.showVisible = false
    },
    showModal() {
      this.visible = true
    },
    closeModal(value) {
      console.log("接受孩子传来的数值", value)
    }
  }
}
</script>

<style scoped>

</style>
